//demo类

//随机id
const randomId = ()=>Array.from({ length: 8 }, () => Math.floor(Math.random() * 100) + 1).join('')
//当前时间
const currentTime = new Date().toLocaleString()

//-------------------------------【项目】-------------------------------
export function ProjectObj (obj?){
  this.id = randomId();
  this.projectNo = obj.projectNo ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.createTime = currentTime ?? null;
}

//-------------------------------【站点】-------------------------------
export function StationObj (obj?){
  this.id = randomId();
  //立项
  this.stationNo = obj.stationNo ?? null;
  this.planName = obj.planName ?? null;
  this.isNew = obj.isNew ?? null;
  this.versions = obj.versions ?? null;
  this.area = obj.area ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.projectId = obj.projectId ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.address = obj.address ?? null;
  this.latitude = obj.latitude ?? null;
  this.longitude = obj.longitude ?? null;
  this.createTime = currentTime;
  //指派
  this.coordinatPerson = obj.coordinatPerson ?? null;
  this.headPerson = obj.headPerson ?? null;
  this.buildPerson = obj.buildPerson ?? null;
  this.adminPerson = obj.adminPerson ?? null;
  this.otherPerson = obj.otherPerson ?? null;
  this.publicTime = obj.publicTime ?? null;
  //建站
  this.towerAdmin = obj.towerAdmin ?? null;
  this.towerType = obj.towerType ?? null;
  this.roomAdmin = obj.roomAdmin ?? null;
  this.roomType = obj.roomType ?? null;
  this.eleAdmin = obj.eleAdmin ?? null;
  this.towerDesc = obj.towerDesc ?? null;
  this.buildTime = obj.buildTime ?? null;
  //开通
  this.buildPayment = obj.buildPayment ?? null;
  this.performance = obj.performance ?? null;
  this.supportFiles = obj.supportFiles ?? [];
  this.beforeFiles = obj.beforeFiles ?? [];
  this.openTime = obj.openTime ?? null;
  //前项资料
  this.signingName = obj.signingName ?? null;
  this.siteNo = obj.siteNo ?? null;
  //状态
  this.status = obj.status ?? null;
}

//-------------------------------【业主】-------------------------------
export function OwnerObj(obj?) {
  this.id = randomId();
  this.ownerName = obj.ownerName ?? null;
  this.contact = obj.contact ?? null;
  this.phone = obj.phone ?? null;
  this.taxNumber = obj.taxNumber ?? null;
  this.paymentCount = obj.paymentCount ?? null;
  this.address = obj.address ?? null;
}

//-------------------------------【业主付款单位】-------------------------------
export function PaymentObj(obj?) {
  this.id = randomId();
  this.ownerId = obj.ownerId ?? null;
  this.paymentName = obj.paymentName ?? null;
  this.paymentType = obj.paymentType ?? null;
  this.bank = obj.bank ?? null;
  this.account = obj.account ?? null;
  this.phone = obj.phone ?? null;
  this.address = obj.address ?? null;
  this.createTime = currentTime ?? null;
}

//-------------------------------【业主合同】-------------------------------
export function OwnerContractObj(obj?) {
  this.id = randomId();
  this.projectId = obj.projectId ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.stationCount = obj.stationCount ?? null;
  this.eleUnit = obj.eleUnit ?? null;
  this.isFloat = obj.isFloat ?? null;
  this.floatCount = obj.floatCount ?? null;

  this.rentG = obj.rentG ?? null;
  this.rentS = obj.rentS ?? null;
  this.segmentOncePrivate = obj.segmentOncePrivate ?? null;
  this.segmentOncePublic = obj.segmentOncePublic ?? null;
  this.eleDeposit = obj.eleDeposit ?? null;
  this.rentDeposit = obj.rentDeposit ?? null;
  //0-新签代签，1-待审核，2-履约中，3-履约完成
  this.status = obj.status ?? null;
}
//业主电费
export function OwnerEleContractObj(obj?) {
  this.id = randomId();
  this.projectId = obj.projectId ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.paymentId = obj.paymentId ?? null;
  this.paymentName = obj.paymentName ?? null;
  this.eleStart = obj.eleStart ?? null;
  this.eleEnd = obj.eleEnd ?? null;
  this.eleCycle = obj.eleCycle ?? null;
  this.eleUnit = obj.eleUnit ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.isFloat = obj.isFloat ?? null;
  this.floatCount = obj.floatCount ?? null;
  //0-待审核，1-执行中，2-已完成，3-未开始,4-已作废
  this.status = obj.status ?? null;
  this.createTime = currentTime ?? null;
}
//业主场租
export function OwnerRentContractObj(obj?) {
  this.id = randomId();
  this.projectId = obj.projectId ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.paymentId = obj.paymentId ?? null;
  this.paymentName = obj.paymentName ?? null;
  this.rentStart = obj.rentStart ?? null;
  this.rentEnd = obj.rentEnd ?? null;
  this.rentCycle = obj.rentCycle ?? null;
  //0-对公每年，1-对私每年，2-对私一次，3-对公一次，4-保证金
  this.rentType = obj.rentType ?? null;
  this.rentG = obj.rentG ?? null;
  this.rentS = obj.rentS ?? null;
  this.privatePay = obj.privatePay ?? null;
  this.publicPay = obj.publicPay ?? null;
  this.segmentCount = obj.segmentCount ?? null;
  this.segmentOnce = obj.segmentOnce ?? null;
  this.eleDeposit = obj.eleDeposit ?? null;
  this.rentDeposit = obj.rentDeposit ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.remark = obj.remark ?? null;
  //0-待审核，1-执行中，2-已完成，3-未开始,4-已作废
  this.status = obj.status ?? null;
  this.createTime = currentTime ?? null;
}

//业主场租订单
export function OwnerRentOrder(obj?) {
  this.id = randomId();
  this.projectId = obj.projectId ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.paymentId = obj.paymentId ?? null;
  this.paymentName = obj.paymentName ?? null;
  this.bank = obj.bank ?? null;
  this.account = obj.account ?? null;
  this.contractId = obj.contractId ?? null;
  //0-租金G，1-租金S，2-对私处理，3-对公处理，4-保证金
  this.orderType = obj.orderType ?? null;
  this.orderNo = obj.orderNo ?? null;
  this.orderStart = obj.orderStart ?? null;
  this.orderEnd = obj.orderEnd ?? null;
  this.orderPrice = obj.orderPrice ?? null;
  this.realPrice = obj.realPrice ?? null;
  this.remark = obj.remark ?? null;
  //0-待确认,1-待发起审批,2-已支付,3-已驳回，4-已撤回审批，5-已作废
  this.status = obj.status ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.createTime = currentTime ?? null;
}

//业主电费订单
export function OwnerEleOrder(obj?) {
  this.id = randomId();
  this.projectId = obj.projectId ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerId = obj.ownerId ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.paymentId = obj.paymentId ?? null;
  this.paymentName = obj.paymentName ?? null;
  this.bank = obj.bank ?? null;
  this.account = obj.account ?? null;
  this.contractId = obj.contractId ?? null;
  this.meterId = obj.meterId ?? null;
  this.meterNo = obj.meterNo ?? null;
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.startDegree = obj.startDegree ?? null;
  this.endDegree = obj.endDegree ?? null;
  this.startTime = obj.startTime ?? null;
  this.endTime = obj.endTime ?? null;
  this.payDegree = obj.payDegree ?? null;
  this.eleUnit = obj.eleUnit ?? null;
  this.eleTotal = obj.eleTotal ?? null;
  this.realUnit = obj.realUnit ?? null;
  this.realTotal = obj.realTotal ?? null;
  this.isTarget = obj.isTarget ?? null;
  this.targetUnit = obj.targetUnit ?? null;
  this.targetTotal = obj.targetTotal ?? null;
  this.isFloat = obj.isFloat ?? null;
  this.maxUnit = obj.maxUnit ?? null;
  //0-待确认，1-待非标确认，2-待发去审批，3-已支付，4-已驳回，5-已被撤销,6-已作废
  this.status = obj.status ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.remark = obj.remark ?? null;
  this.createTime = currentTime ?? null;
}

//-------------------------------【电表】-------------------------------
//电表
export function MeterObj(obj?) {
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.projectName = obj.projectName ?? null;
  this.ownerName = obj.ownerName ?? null;
  this.operatorName = obj.operatorName ?? null;

  this.meterNo = obj.meterNo ?? null;
  this.initDegree = obj.initDegree ?? null;
  this.initTime = obj.initTime ?? null;
  this.brand = obj.brand ?? null;
  this.typeCode = obj.typeCode ?? null;
  this.detailAddress = obj.detailAddress ?? null;

  this.currentDegree = obj.currentDegree ?? null;
  this.sendRecent = obj.sendRecent ?? null;
  this.ownerDone = obj.ownerDone ?? null;
  this.operatorDone = obj.operatorDone ?? null;
  this.ownerRecent = obj.ownerRecent ?? null;
  this.operatorRecent = obj.operatorRecent ?? null;
  //0-正常，1-停用
  this.status = obj.status ?? null
  this.createTime = currentTime ?? null;
}
//抄表记录
export function SendRecordObj (obj?){
  this.id = randomId();
  this.meterId = obj.meterId ?? null;
  this.sendTime = obj.sendTime ?? null;
  this.eleType = obj.eleType ?? null;
  this.eleValue = obj.eleValue ?? null;
  this.meterDegree = obj.meterDegree ?? null;
  this.useDegree = obj.useDegree ?? null;
  this.pueValue = obj.pueValue ?? null;
  this.issueNo = obj.issueNo ?? null;
  //0-已生效，1-已作废
  this.status = obj.status ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.canCancel = obj.canCancel ?? null;
  this.createTime = currentTime ?? null;
}
//-------------------------------【运营商】-------------------------------
//运营商
export function OperatorObj(obj?) {
  this.id = randomId();
  this.operator = obj.operator ?? null;
  this.fullName = obj.fullName ?? null;
  this.taxNumber = obj.taxNumber ?? null;
  this.bank = obj.bank ?? null;
  this.account = obj.account ?? null;
  this.contact = obj.contact ?? null;
  this.phone = obj.phone ?? null;
  this.createTime = currentTime ?? null;
}
//-------------------------------【运营商合同】-------------------------------
//运营商合同
export function OperatorContractObj(obj?){
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.signingName = obj.signingName ?? null;

  this.eleStart = obj.eleStart ?? null;
  this.eleEnd = obj.eleEnd ?? null;
  this.eleCycle = obj.eleCycle ?? null;
  this.eleUnit = obj.eleUnit ?? null;
  this.eleSigningUnit = obj.eleSigningUnit ?? null;
  this.eleInvoiceType = obj.eleInvoiceType ?? null;
  this.eleTax = obj.eleTax ?? null;
  this.eleInvoiceContent = obj.eleInvoiceContent ?? null;

  this.rentStart = obj.rentStart ?? null;
  this.rentEnd = obj.rentEnd ?? null;
  this.rentCycle = obj.rentCycle ?? null;
  this.rentOnce = obj.rentOnce ?? null;
  this.rentTotal = obj.rentTotal ?? null;
  this.rentSigningUnit = obj.rentSigningUnit ?? null;
  this.rentInvoiceType = obj.rentInvoiceType ?? null;
  this.rentTax = obj.rentTax ?? null;
  this.rentInvoiceContent = obj.rentInvoiceContent ?? null;
  this.status = obj.status ?? null;
}
//运营商电费
export function OperatorEleContractObj(obj?) {
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.eleStart = obj.eleStart ?? null;
  this.eleEnd = obj.eleEnd ?? null;
  this.eleCycle = obj.eleCycle ?? null;
  this.eleUnit = obj.eleUnit ?? null;

  this.eleSigningUnit = obj.eleSigningUnit ?? null;
  this.eleInvoiceType = obj.eleInvoiceType ?? null;
  this.eleTax = obj.eleTax ?? null;
  this.eleInvoiceContent = obj.eleInvoiceContent ?? null;
  //0-履约中，1-履约完成，2-提前终止，3-已被作废
  this.status = obj.status ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.createTime = currentTime ?? null;
}
//运营商场租
export function OperatorRentContractObj(obj?) {
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.rentStart = obj.rentStart ?? null;
  this.rentEnd = obj.rentEnd ?? null;
  this.rentCycle = obj.rentCycle ?? null;
  this.rentOnce = obj.rentOnce ?? null;
  this.rentTotal = obj.rentTotal ?? null;

  this.rentSigningUnit = obj.rentSigningUnit ?? null;
  this.rentInvoiceType = obj.rentInvoiceType ?? null;
  this.rentTax = obj.rentTax ?? null;
  this.rentInvoiceContent = obj.rentInvoiceContent ?? null;
  //0-履约中，1-履约完成，2-提前终止，3-已被作废
  this.status = obj.status ?? null;
  this.remark = obj.remark ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.createTime = currentTime ?? null;
}
//运营商场租订单
export function OperatorRentOrderObj(obj?) {
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.contractId = obj.contractId ?? null;
  this.orderNo = obj.orderNo ?? null;
  this.orderStart = obj.orderStart ?? null;
  this.orderEnd = obj.orderEnd ?? null;
  this.orderPrice = obj.orderPrice ?? null;
  this.realPrice = obj.realPrice ?? null;
  this.rentSigningUnit = obj.rentSigningUnit ?? null;
  this.rentInvoiceType = obj.rentInvoiceType ?? null;
  this.rentTax = obj.rentTax ?? null;
  this.rentInvoiceContent = obj.rentInvoiceContent ?? null;
  //0-待确认，1-待申请开票，2-待开票，3-已开票，4-已回款，5-已申请待冲红，6-已冲红，7-已作废
  this.status = obj.status ?? null;
  this.remark = obj.remark ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.createTime = currentTime ?? null;
}
//-------------------------------【发票管理】-------------------------------
//开票申请
export function TakeRentInvoiceObj(obj?) {
  this.id = randomId();
  this.stationId = obj.stationId ?? null;
  this.stationName = obj.stationName ?? null;
  this.signingName = obj.signingName ?? null;
  this.isNew = obj.isNew ?? null;
  this.area = obj.area ?? null;
  this.address = obj.address ?? null;
  this.operatorId = obj.operatorId ?? null;
  this.operator = obj.operator ?? null;
  this.invoicePrice = obj.invoicePrice ?? null;
  this.rentSigningUnit = obj.rentSigningUnit ?? null;
  this.rentInvoiceType = obj.rentInvoiceType ?? null;
  this.rentInvoiceContent = obj.rentInvoiceContent ?? null;
  this.rentTax = obj.rentTax ?? null;
  this.orderId = obj.orderId ?? [];
  //0-未处理，1-已处理，2-驳回
  this.status = obj.status ?? null;
  this.remark = obj.remark ?? null;
  this.cancelCase = obj.cancelCase ?? null;
  this.createTime = currentTime ?? null;
}
